<?php


namespace App\Transformers\User;

use App\Models\UserBrokerageFrozen;
use League\Fractal\TransformerAbstract;

class UserBrokerageFrozensTransformer extends TransformerAbstract
{

    public function transform(UserBrokerageFrozen $userBrokerageFrozen)
    {
        return [
            'id'=>$userBrokerageFrozen->id,
            'user_id'=>$userBrokerageFrozen->user_id ?? '',
            'price'=>$userBrokerageFrozen->price ?? '',
            'uill_id'=>$userBrokerageFrozen->uill_id ?? '',
            'frozen_time'=>$userBrokerageFrozen->frozen_time ?? '',
            'order_id'=>$userBrokerageFrozen->order_id ?? '',
            'status'=>$userBrokerageFrozen->status ?? 1,
            'created_at' => $userBrokerageFrozen->created_at ? $userBrokerageFrozen->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $userBrokerageFrozen->updated_at ? $userBrokerageFrozen->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }


}
